
USE [MyBlogDB]
GO
CREATE TABLE [dbo].[BlogNews](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](30) NOT NULL,
	[Content] [text] NOT NULL,
	[Time] [datetime] NOT NULL,
	[BrowseCount] [int] NOT NULL,
	[LikeCount] [int] NOT NULL,
	[TypeId] [int] NOT NULL,
	[WriterId] [int] NOT NULL,
 CONSTRAINT [PK_BlogNews_Id] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TypeInfo]    Script Date: 2022/1/17 16:22:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TypeInfo](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](12) NOT NULL,
 CONSTRAINT [PK_TypeInfo_Id] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[WriterInfo]    Script Date: 2022/1/17 16:22:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[WriterInfo](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](12) NOT NULL,
	[UserName] [nvarchar](16) NOT NULL,
	[UserPwd] [nvarchar](64) NOT NULL,
 CONSTRAINT [PK_WriterInfo_Id] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[BlogNews] ON 
GO
INSERT [dbo].[BlogNews] ([Id], [Title], [Content], [Time], [BrowseCount], [LikeCount], [TypeId], [WriterId]) VALUES (1, N'笑傲江湖', N'笑傲江湖令狐冲', CAST(N'2022-01-17T16:07:28.447' AS DateTime), 0, 0, 1, 1)
GO
SET IDENTITY_INSERT [dbo].[BlogNews] OFF
GO
SET IDENTITY_INSERT [dbo].[TypeInfo] ON 
GO
INSERT [dbo].[TypeInfo] ([Id], [Name]) VALUES (1, N'小说')
GO
SET IDENTITY_INSERT [dbo].[TypeInfo] OFF
GO
SET IDENTITY_INSERT [dbo].[WriterInfo] ON 
GO
INSERT [dbo].[WriterInfo] ([Id], [Name], [UserName], [UserPwd]) VALUES (1, N'admin', N'admin', N'E1ADC3949BA59ABBE56E057F2F883E')
GO
SET IDENTITY_INSERT [dbo].[WriterInfo] OFF
GO
USE [master]
GO
ALTER DATABASE [MyBlogDB] SET  READ_WRITE 
GO
